package sy.pageModel;

//会员账户信息类
public class MemberAccount {
	
	private int id; //序号
	private String name = ""; //姓名
	private String regDate = ""; //注册日期
	private String cardId = "";  //卡号
	private String memberType = ""; //会员类型
	private double rechargeFee; //已充值金额(多次充值之和)
	private double memberFee;   //已缴纳的会费（多次缴纳之和）
	private double consumeFee;  //消费性会费（等于已充值金额-已缴纳的会费）
	private double balance;     //余额（等于已充值金额-已缴纳会费-已消费金额）
	private double totalConsumed; //已消费金额（等于已充值金额-已缴纳的会费-余额）
	
	public int getId() {
		return this.id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	
	public String getName() {
		return this.name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getRegDate() {
		if(this.regDate != null && this.regDate.length() > 9) {
			return this.regDate.substring(0, 10);
		} else {
		    return this.regDate;
		}
	}
	
	public void setRegDate(String regDate) {
		this.regDate = regDate;
	}
	
	public String getCardId() {
		return this.cardId;
	}
	
	public void setCardId(String cardId) {
		this.cardId = cardId;
	}
	
	public String getMemberType() {
		return Member.MEMBER_TYPE_MAP.get(this.memberType);
	}
	
	public void setMemberType(String memberType) {
		this.memberType = memberType;
	}
	
	public double getRechargeFee() {
		return this.rechargeFee;
	}
	
	public void setRechargeFee(double rechargeFee) {
		this.rechargeFee = rechargeFee;
	}
	
	public double getMemberFee() {
		return this.memberFee;
	}
	
	public void setMemberFee(double memberFee) {
		this.memberFee = memberFee;
	}

	public double getConsumeFee() {
		return this.consumeFee;
	}
	
	public void setConsumeFee(double consumeFee) {
		this.consumeFee = consumeFee;
	}
	
	public double getBalance() {
		return this.balance;
	}
	
	public void setBalance(double balance) {
		this.balance = balance;
	}
	
	public double getTotalConsumed() {
		return this.totalConsumed;
	}
	
	public void setTotalConsumed(double totalConsumed) {
		this.totalConsumed = totalConsumed;
	}
}
